import { getAction, deleteAction, putAction, putparamsAction, postAction, httpAction } from '@/api/manage'
//  仓库管理-物品管理
const goodsList = (params) => getAction('/wms/goods/list', params)
const goodsAdd = (params) => postAction('/wms/goods/add', params)
const goodsEdit = (params) => putAction('/wms/goods/edit', params)
const goodsQueryById = (params) => getAction('/wms/goods/queryById', params)
const categoryGetTree = (params) => getAction('/sys/category/getTree', params)
const getSupplierPageList = (params) => getAction('/purchasemgt/erpPurchaseContract/selectSupplierList', params)//供应商下拉
const goodsLogicDel = (params) => deleteAction('/wms/goods/logicDelete', params)
const goodsLogicDelBatch = (params) => deleteAction('/wms/goods/logicDeleteBatch', params)
// 获取字典下拉 传dictCode
const getDictModel = (params) => getAction('/sys/dict/getDictModel', params)
// 基础管理-班组管理
const teamGroupList = (params) => getAction('/mess/teamGroup/list', params)
const teamGroupQueryById = (params) => getAction('/mess/teamGroup/queryById', params)
const teamGroupAdd = (params) => postAction('/mess/teamGroup/add', params)
const teamGroupEdit = (params) => putAction('/mess/teamGroup/edit', params)
const getUserDict = (params) => getAction('/sys/user/getUserDict', params) //辅助单位-表格-工序成员
const teamGroupDel = (params) => deleteAction('/mess/teamGroup/logicDelete', params)
const teamGroupDelBatch = (params) => deleteAction('/mess/teamGroup/logicDeleteBatch', params)

// 技术管理-生产工序
const productProcessList = (params) => getAction('/mess/messProductProcess/list', params)
const productProcessQueryById = (params) => getAction('/mess/messProductProcess/queryById', params)
const productProcessAdd = (params) => postAction('/mess/messProductProcess/add', params)
const productProcessEdit = (params) => putAction('/mess/messProductProcess/edit', params)
const productProcessBatchDelete = (params) => deleteAction('/mess/messProductProcess/logicDeleteBatch', params)
const productProcessDelete = (params) => deleteAction('/mess/messProductProcess/logicDelete', params)

// 技术管理-生产流程
const messProductFlowList = (params) => getAction('/prodset/messProductFlow/list', params) // 列表
const messProductFlowAdd = (params) => postAction('/prodset/messProductFlow/add', params) // 新建
const messProductFlowQueryById = (params) => getAction('/prodset/messProductFlow/queryById', params) // 详情
const messProductFlowDel = (params) => deleteAction('/prodset/messProductFlow/delete', params) // 删除
const messProductFlowDelBatch = (params) => deleteAction('/prodset/messProductFlow/deleteBatch', params) // 批量删除
const messProductFlowEdit = (params) => putAction('/prodset/messProductFlow/edit', params) // 编辑
const queryFlowProcessListByFlowId = (params) => getAction('/prodset/messProductFlow/queryFlowProcessListByFlowId', params) // 流程下的工序


// 技术管理-工艺路线
const productCraftProcessRelList = (params) => getAction('/mess/messProductCraft/list', params)
const basicProcessRouteInfoList = (params) => getAction('/basicprocess/basicProcessRouteInfo/list', params)
const checkByGoodsIdt = (params) => getAction('/mess/messProductCraft/checkByGoodsId', params)//校验物料
const productCraftProcessRelById = (params) => getAction('/mess/messProductCraft/queryById', params)
const productCraftProcessRelAdd = (params) => postAction('/mess/messProductCraft/add', params)
const productCraftProcessRelEdit = (params) => putAction('/mess/messProductCraft/edit', params)
const basicProcessRouteInfoAdd = (params) => postAction('/basicprocess/basicProcessRouteInfo/add', params)
const basicProcessRouteInfoEdit = (params) => putAction('/basicprocess/basicProcessRouteInfo/edit', params)
const basicProcessRouteInfoQueryById = (params) => getAction('/basicprocess/basicProcessRouteInfo/queryById', params)
const getAllGoodsBaseInfo = (params) => getAction('/wms/goods/getAllGoodsBaseInfo', params)//物料下拉
const productGetDictPageList = (params) => getAction('/mess/messProductProcess/getDictPageList', params)//表格 工序下拉
const productCraftDel = (params) => deleteAction('/mess/messProductCraft/logicDelete', params)
const basicProcessRouteInfoDelete = (params) => deleteAction('/basicprocess/basicProcessRouteInfo/delete', params)
const basicProcessRouteInfoDeleteBatch = (params) => deleteAction('/basicprocess/basicProcessRouteInfo/deleteBatch', params)
const productCraftDelBatch = (params) => deleteAction('/mess/messProductCraft/logicDeleteBatch', params)


// 生产管理 合格品清单
const qualifiedList = (params) => getAction('/mess/messQualifiedList/list', params)

// 生产管理-合格品清单申请入库
const pageQueryQualityInboundRecord = (params) => getAction('/mess/messQualifiedList/pageQueryQualityInboundRecord', params)
const qualifiedListApplyInBound = (params) => postAction('/mess/messQualifiedList/applyInBound', params) //申请入库

// 生产管理-合格品入库申请清单
const qualifiedInboundApplyList = (params) => getAction('/mess/messQualifiedInboundApply/list', params)

const qualifiedInboundApplyDel = (params) => deleteAction('/mess/messQualifiedInboundApply/logicDelete', params)
const qualifiedInboundApplyDelBa = (params) => deleteAction('/mess/messQualifiedInboundApply/logicDeleteBatch', params)
const qualifiedInApplyQueryById = (params) => getAction('/mess/messQualifiedInboundApply/queryById', params)
// 退料单
const returnMaterialApplyList = (params) => getAction('/mess/messReturnMaterialApply/list', params)
const returnMaterialQueryById = (params) => getAction('/mess/messReturnMaterialApply/queryById', params)
const returnMaterialAdd = (params) => postAction('/mess/messReturnMaterialApply/add', params)
const returnMaterialDelete = (params) => deleteAction('/mess/messReturnMaterialApply/logicDelete', params) // 删除退料
const messQualifiedInboundApplyDelete = (params) => deleteAction('/mess/messQualifiedInboundApply/delete', params) // 合格品申请删除
const datatype = (params) => getAction('/sys/dict/getDictItems/date_type', params) 
const formedit = (params) => putAction('/basic/basicCodeRule/edit', params) 


export {
  queryFlowProcessListByFlowId,
  messProductFlowEdit,
  messProductFlowDelBatch,
  messProductFlowDel,
  messProductFlowQueryById,
  messProductFlowAdd,
  messProductFlowList,
  messQualifiedInboundApplyDelete,
  returnMaterialDelete,
  goodsAdd,
  goodsList,
  teamGroupList,
  teamGroupQueryById,
  teamGroupAdd,
  teamGroupEdit,
  getDictModel,
  getUserDict,
  productProcessList,
  productProcessEdit,
  productProcessQueryById,
  productProcessAdd,
  basicProcessRouteInfoList,
  basicProcessRouteInfoAdd,
  basicProcessRouteInfoEdit,
  basicProcessRouteInfoQueryById,
  basicProcessRouteInfoDelete,
  basicProcessRouteInfoDeleteBatch,
  productCraftProcessRelList,
  productCraftProcessRelById,
  productCraftProcessRelAdd,
  productCraftProcessRelEdit,
  getAllGoodsBaseInfo,
  productGetDictPageList,
  productProcessDelete,
  productProcessBatchDelete,
  productCraftDel,
  productCraftDelBatch,
  teamGroupDel,
  teamGroupDelBatch,
  goodsQueryById,
  categoryGetTree,
  goodsEdit,
  getSupplierPageList,
  checkByGoodsIdt,
  goodsLogicDel,
  goodsLogicDelBatch,
  qualifiedList,
  pageQueryQualityInboundRecord,
  qualifiedInboundApplyList,
  qualifiedInboundApplyDel,
  qualifiedInboundApplyDelBa,
  qualifiedInApplyQueryById,
  qualifiedListApplyInBound,
  returnMaterialApplyList,
  returnMaterialQueryById,
  returnMaterialAdd,
  datatype,
  formedit
}
